// src/manifest.ts - Chrome Extension Manifest V3 Configuration

const manifest = {
  manifest_version: 3 as const,
  name: 'SideX',
  version: '0.0.1',
  description: 'SideX Chrome Extension - Your intelligent side panel companion',
  permissions: ['storage', 'scripting', 'activeTab', 'contextMenus', 'sidePanel', 'commands'],
  host_permissions: ['<all_urls>'],
  action: {
    default_icon: {
      16: 'icons/icon16.png',
      32: 'icons/icon32.png',
      48: 'icons/icon48.png',
      128: 'icons/icon128.png',
    },
    default_title: 'Toggle SideX Panel',
  },
  commands: {
    _execute_action: {
      suggested_key: { default: 'Alt+S' },
      description: 'Toggle SideX panel'
    }
  },
  background: {
    service_worker: 'src/background/index.ts',
    type: 'module' as const,
  },
  side_panel: {
    default_path: 'src/sidepanel/sidepanel.html',
  },
  content_scripts: [
    {
      matches: ['<all_urls>'],
      js: ['src/content/index.ts'],
      run_at: 'document_end' as const,
    },
  ],
  icons: {
    16: 'icons/icon16.png',
    32: 'icons/icon32.png',
    48: 'icons/icon48.png',
    128: 'icons/icon128.png',
  },
  web_accessible_resources: [
    {
      resources: ['src/assets/*'],
      matches: ['<all_urls>'],
    },
  ],
};

export default manifest;